package com.golang.api.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.golang.api.domain.WithdrawLog;
import com.golang.api.dto.request.WithdrawDto;
import com.golang.api.mapper.WithdrawLogMapper;
import com.golang.api.service.IWithdrawLogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 提现日志Service业务层处理
 *
 * @author 自动生成
 * @date 2025-04-06
 */
@Service
public class WithdrawLogServiceImpl extends ServiceImpl<WithdrawLogMapper, WithdrawLog> implements IWithdrawLogService {

    @Override
    public boolean apply(WithdrawDto withdrawalDto) {
        WithdrawLog withdrawLog = new WithdrawLog();
        withdrawLog.setUserId(withdrawalDto.getUserId());
        withdrawLog.setWithdrawAmount(withdrawalDto.getAmount());
        withdrawLog.setBankCard(withdrawalDto.getBankCard());
        return save(withdrawLog);
    }
}
